package qc.common.core.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 渠成消息通知相关枚举类
 *
 * @author QuCheng Tech
 * @create 2023/11/03
 */
public class QcMessageEnumClass {

    /**
     * 接收对象类型
     */
    @Getter
    @AllArgsConstructor
    public enum rcvTypeEnum {
        SPECIFY_USER(1, "指定用户"),
        SPECIFY_RECEIVING_GROUP(2, "指定接收组"),
        ALL_USER(3, "所有用户"),
        ALL_VISITORS(4, "所有访问者");

        @EnumValue
        private Integer index;
        private String name;
    }

    /**
     * 重要等级
     */
    @Getter
    @AllArgsConstructor
    public enum levelEnum {
        LOW(1, "低"),
        MEDIUM(2, "中"),
        HIGH(3, "高");

        @EnumValue
        private Integer index;
        private String name;
    }

    /**
     * 通知送达方式类型
     */
    @Getter
    @AllArgsConstructor
    public enum noticeTypeEnum {
        MESSAGE_CENTER(1, "消息中心"),
        IN_APP_MESSAGES(2, "应用内消息"),
        IN_APP_NOTIFICATIONS(4, "应用内通知"),
        MAIL(8, "邮件"),
        WECHAT(32, "微信"),
        TEXT_MESSAGE(64, "短信"),
        PHONE(128, "电话");

        @EnumValue
        private Integer index;
        private String name;
    }

    /**
     * 触发操作类型
     * 取值表示 操作类型 或 预警等级。
     */
    @Getter
    @AllArgsConstructor
    public enum optTypeEnum {
        OPERATION_TYPE("操作类型"),
        WARNING_LEVEL("预警等级");

        private String name;

        /**
         * 操作类型取值枚举
         */
        @Getter
        @AllArgsConstructor
        enum operationTypeEnum {
            SUCCESS(1, "成功"),
            INFO(2, "信息"),
            WARNING(3, "警告"),
            FAIL(4, "失败"),
            ERROR(5, "错误");

            @EnumValue
            private Integer index;
            private String name;
        }

        /**
         * 预警等级取值枚举
         */
        @Getter
        @AllArgsConstructor
        enum warningLevelEnum {
            SUCCESS(1, "解除预警"),
            INFO(2, "蓝色预警"),
            WARNING(3, "橙色预警"),
            FAIL(4, "黄色预警"),
            ERROR(5, "红色预警");

            @EnumValue
            private Integer index;
            private String name;
        }
    }

    /**
     * 时效性时段类型
     */
    @Getter
    @AllArgsConstructor
    public enum timelyTypeEnum {
        MINUTE(1, "分钟"),
        HOUR(2, "小时"),
        DAY(3, "日"),
        WEEK(4, "周"),
        MONTH(5, "月");

        @EnumValue
        private Integer index;
        private String name;
    }

    /**
     * 消息通知状态类型
     */
    @Getter
    @AllArgsConstructor
    public enum noticeStatusTypeEnum {
        NOT_TRIGGERED(0, "未触发（有指定触发条件，但未满足触发条件）"),
        NOT_NOTIFIED(1, "未通知"),
        NOTIFIED(2, "已通知");

        @EnumValue
        private Integer index;
        private String name;
    }
}
